Skip to content

Conversation

@matthewp
Copy link
Contributor

@matthewp matthewp commented Feb 2, 2026

Changes

Testing

Added test case in TestTransformTrailingSpace to verify trailing whitespace before style tags is removed.

Docs

Bug fix only, no docs needed.

When a style tag is extracted from the document, any preceding
whitespace-only text node is now also removed if it would become
trailing whitespace.

Fixes #1065
@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

🦋 Changeset detected

Latest commit: f7b828f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/compiler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matthewp matthewp marked this pull request as draft February 3, 2026 13:12
@matthewp matthewp marked this pull request as ready for review February 5, 2026 19:27
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
@matthewp matthewp merged commit 8275bdd into main Feb 6, 2026
5 checks passed
@matthewp matthewp deleted the fix/issue-1065 branch February 6, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slots remove whitespace where it shouldn't when <style> is used

2 participants